package com.taoxi.good.service.Impl;

import com.taoxi.good.domain.GoodImg;
import com.taoxi.good.mapper.GoodImgMapper;
import com.taoxi.good.service.IGoodImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商品图片Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-21
 */
@Service
public class GoodImgServiceImpl implements IGoodImgService {
    @Autowired
    private GoodImgMapper goodImgMapper;

    /**
     * 查询商品图片
     *
     * @param id 商品图片主键
     * @return 商品图片
     */
    @Override
    public GoodImg selectGoodImgById(Long id) {
        return goodImgMapper.selectGoodImgById(id);
    }

    /**
     * 查询商品图片列表
     *
     * @param goodImg 商品图片
     * @return 商品图片
     */
    @Override
    public List<GoodImg> selectGoodImgList(GoodImg goodImg) {
        return goodImgMapper.selectGoodImgList(goodImg);
    }

    /**
     * 新增商品图片
     *
     * @param goodImg 商品图片
     * @return 结果
     */
    @Override
    public int insertGoodImg(GoodImg goodImg) {
        return goodImgMapper.insertGoodImg(goodImg);
    }

    /**
     * 修改商品图片
     *
     * @param goodImg 商品图片
     * @return 结果
     */
    @Override
    public int updateGoodImg(GoodImg goodImg) {
        return goodImgMapper.updateGoodImg(goodImg);
    }

    /**
     * 批量删除商品图片
     *
     * @param ids 需要删除的商品图片主键
     * @return 结果
     */
    @Override
    public int deleteGoodImgByIds(Long[] ids) {
        return goodImgMapper.deleteGoodImgByIds(ids);
    }

    /**
     * 删除商品图片信息
     *
     * @param id 商品图片主键
     * @return 结果
     */
    @Override
    public int deleteGoodImgById(Long id) {
        return goodImgMapper.deleteGoodImgById(id);
    }
}
